Component({
  properties: {
    hudText: {
      type: String,
      value: '',
    },
    hudVisible: {
      type: Boolean,
      value: false,
      observer: function (newVal, oldVal){
        this.time && clearTimeout(this.time);
        this.time = newVal && setTimeout(()=> {
          this.setData({ hudVisible: false})
        }, 2000);
      }
    }
  },
  data: {
    hudAnimation:{}, // 动画
  },
  detached() {
    this.time && clearTimeout(this.time);
  }
})